﻿using System;
using System.Runtime.Serialization;
using Lab620.WcfRadiusService.Extentions;

namespace Lab620.WcfRadiusService
{
    [DataContract(Namespace = RadiusMessageConstants.RadiusEncodingNamespace)]
    public class RadiusFault 
    {
        public RadiusFault()
        {
        }
        public RadiusFault(string message)
        {
            this.Message = message;
        }

        public RadiusFault(int code, string message) : this(message)
        {
            this.Code = code;
        }

        [DataMember]
        private int Code { get; set; }

        [DataMember]
        private string Message { get; set; }
    }

    public class RadiusException : ApplicationException
    {
        public RadiusException(string message) : base(message)
        {
        }
    }
}
